package com.kitty.game.hunqiao.enums;


import java.util.concurrent.ThreadLocalRandom;

/**
 * todo 注释掉的属性，在数据库里没有， 后续处理下
 *
 * 参数在TYZQAttribList
 */
public enum  FieldsEnum {
    /**
     * ID别搞错的，出问题的，
     */
    F3("物伤",(short)3,(short)224,(short)1124),
    F10("法伤",(short)10,(short)207 ,(short)1036),
    F7("气血",(short)7,(short)986 ,(short)4934),
    F8("防御",(short)8,(short)657,(short)3289),
    F14("速度",(short)14,(short)56,(short)282),
    F2("力量",(short)2,(short)6,(short)31),
    F9("灵力",(short)9,(short)6,(short)31),
    F13("敏捷",(short)13,(short)6,(short)31),
    F5("体质",(short)5,(short)6,(short)31),
    F220("所有属性",(short)220,(short)3,(short)18),
    F79("物理必杀率",(short)79,(short)6,(short)30),
    F225("法术必杀率",(short)225,(short)2,(short)10),
//    F226("抗物理必杀",(short)226,(short)6,(short)30),
//    F227("抗法术必杀",(short)227,(short)2,(short)10),
    F80("反震度",(short)80,(short)6,(short)30),
    F85("反震率",(short)85,(short)6,(short)30),
    F69("反击次数",(short)69,(short)2,(short)10),
    F77("反击率",(short)77,(short)6,(short)30),
    F110("破防",(short)110,(short)6,(short)30),
    F117("破防率",(short)117,(short)6,(short)30),
    F67("物理连击次数",(short)67,(short)2,(short)12),
    F78("物理连击率",(short)78,(short)6,(short)30),
//    F228("抗物理连击",(short)228,(short)6,(short)30),
    F126("忽视目标抗金",(short)126,(short)6,(short)30),
    F127("忽视目标抗木",(short)127,(short)6,(short)30),
    F128("忽视目标抗水",(short)128,(short)6,(short)30),
    F129("忽视目标抗火",(short)129,(short)6,(short)30),
    F130("忽视目标抗土",(short)130,(short)6,(short)30),
    F168("忽视所有抗性",(short)168,(short)4,(short)20),
    F169("忽视所有抗异常",(short)169,(short)4,(short)20),
    F131("忽视目标抗遗忘",(short)131,(short)6,(short)30),
    F132("忽视目标抗中毒",(short)132,(short)6,(short)30),
    F133("忽视目标抗冰冻",(short)133,(short)6,(short)30),
    F134("忽视目标抗昏睡",(short)134,(short)6,(short)30),
    F135("忽视目标抗混乱",(short)135,(short)6,(short)30),
    F50("金抗性",(short)50,(short)6,(short)30),
    F51("木抗性",(short)51,(short)6,(short)30),
    F52("水抗性",(short)52,(short)6,(short)30),
    F53("火抗性",(short)53,(short)6,(short)30),
    F54("土抗性",(short)54,(short)6,(short)30),
    F222("所有抗性",(short)222,(short)4,(short)20),
    F223("所有抗异常",(short)223,(short)4,(short)20),
    F59("抗遗忘",(short)59,(short)6,(short)30),
    F56("抗中毒",(short)56,(short)6,(short)30),
    F57("抗冰冻",(short)57,(short)6,(short)30),
    F58("抗昏睡",(short)58,(short)6,(short)30),
    F60("抗混乱",(short)60,(short)6,(short)30),
    F170("几率解除遗忘",(short)170,(short)3,(short)15),
    F171("几率解除中毒",(short)171,(short)3,(short)15),
    F172("几率解除冰冻",(short)172,(short)3,(short)15),
    F173("几率解除昏睡",(short)173,(short)3,(short)15),
    F174("几率解除混乱状态",(short)174,(short)3,(short)15),
//    F474("几率躲避障碍",(short)474,(short)2,(short)10),
//    F475("忽视目标躲避障碍",(short)475,(short)2,(short)10),
//    F476("几率偷取辅助状态",(short)476,(short)2,(short)10),
//    F477("抗辅助状态偷取",(short)477,(short)2,(short)10),
//    F478("复活率",(short)478,(short)2,(short)10),
//    F479("忽视目标复活",(short)479,(short)2,(short)10),
//    F480("吸血率",(short)480,(short)2,(short)10),
//    F481("抗吸血",(short)481,(short)2,(short)10),
//    F482("致残率",(short)482,(short)2,(short)10),
//    F483("抗致残",(short)483,(short)2,(short)10),
//    F484("以守为攻",(short)484,(short)2,(short)10),
//    F485("攻其不备",(short)485,(short)2,(short)10),
//    F486("出其不意",(short)486,(short)2,(short)10),

    ;
    /** 名字、属性id，最小-最大值**/
    public String name;
    public short fieldId;
    public short minValueHunQiao;
    public short maxValueHunQiao;

    FieldsEnum(String name,short fieldId,short minValueHunQiao,short maxValueHunQiao  ){
        this.name = name;
        this.fieldId = fieldId;
        this.minValueHunQiao = minValueHunQiao;
        this.maxValueHunQiao = maxValueHunQiao;
    }
    /**随机属性**/
    public static FieldsEnum random(){
        FieldsEnum[] fieldsEnums = FieldsEnum.values();
        int index = ThreadLocalRandom.current().nextInt(fieldsEnums.length);
        return fieldsEnums[index];
    }

    public short randomValue(){
        return  (short)(ThreadLocalRandom.current().nextInt((int)this.minValueHunQiao,(int)this.maxValueHunQiao)+1);
    }
}